package DCSource.ConfigManager;

public class Item{
	private int rand(int low, int high) {  
        high++;  
        return (int) (Math.random() * (high - low) + low);  
    }
	private boolean isWindowsSystem()
	  { String osName = System.getProperty("os.name").toLowerCase();
	    return osName.indexOf("windows") >= 0;
	  }
	  
	private boolean isLinuxSystem()
	  { String osName = System.getProperty("os.name").toLowerCase();
	    return osName.indexOf("linux") >= 0;
	  }
	private String umsch(){
		if (isWindowsSystem()==true){
			return String.valueOf((char)13)+String.valueOf((char)10);
		}else{return String.valueOf((char)10);}
	}
	private String Name=rand(0,999999999)+""+rand(0,999999999);
	private String Source="";
	public Item() {}
	public Item(String title,String value) {
		Name=(title);
		Source=(value);
	}
	public Item(String title) {
		Name=(title);
	}
	public void setTitle(String title){
		Name=(title);
	}
	public void setValue(String value){
		Source=(value);
	}
	public String getValue(){
		if (Source!=null){
		return (Source);}else{
		return ("");
		}
	}
	public String getTitle(){
		if (Name!=null){
			return (Name);}else{
			return ("Name");
			}
	}
	public String toString(){
		String text = "";
		if (Name!=null){
			text = Name;
		}
		if (Source!=null){
			text += ";"+Source;
		}
		return "("+text+")";
	}
}
